package net.fpeg.kotlin.msa.wordbase.dao

import net.fpeg.kotlin.msa.wordbase.entity.WordSentence
import org.springframework.data.domain.Pageable
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.JpaSpecificationExecutor

interface WordSentenceDao : JpaRepository<WordSentence, Long>, JpaSpecificationExecutor<WordSentence> {
    fun findByIdIn(ids: Collection<Long>): List<WordSentence>
    fun findByWordSource_Id(id: Long): List<WordSentence>
    fun findByWordSource_IdOrderById(wordSource_id: Long, pageable: Pageable): List<WordSentence>
    fun findByWordSource_IdOrderById(wordSource_id: Long): List<WordSentence>
    fun findByWordSource_IdInAndEnglishValueContainingOrderById(wordSource_id: Collection<Long>, englishValue: String, pageable: Pageable): List<WordSentence>
    fun getById(id: Long): WordSentence?

}